//
//  FillExpressTableViewCell.m
//  GLGW_Shoping
//
//  Created by yang on 2018/11/27.
//  Copyright © 2018年 yang. All rights reserved.
//

#import "FillExpressTableViewCell.h"

@interface FillExpressTableViewCell ()
@property (nonatomic,strong) GLGWLabel * expressTypelabel;
@property (nonatomic,strong) GLGWLabel * miaoShuLabel;

@end

@implementation FillExpressTableViewCell{
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        GLGWLabel * peiLabel = [[GLGWLabel alloc] initWithFrame:CGRectMake(kWidthProportion_In_iPhoneTriploid(15), kHeightProportion_In_iPhoneTriploid(20), kWidthProportion_In_iPhoneTriploid(80), kHeightProportion_In_iPhoneTriploid(20)) theFont:SYSTEMFONT(14) theColor:kColor_Rule_Black inSuperView:self];
        peiLabel.text = @"配送方式";
        //
        self.expressTypelabel = [[GLGWLabel alloc] initWithFont:SYSTEMFONT(14) theColor:[UIColor colorWithHexString:@"#666666"] inSuperView:self];
        self.expressTypelabel.text = @"卖家承运";
        [self.expressTypelabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.mas_top).offset(kHeightProportion_In_iPhoneTriploid(10));
            make.right.equalTo(self.mas_right).offset(-kWidthProportion_In_iPhoneTriploid(35));
            make.height.equalTo(@(kHeightProportion_In_iPhoneTriploid(20)));
        }];
        //
        self.miaoShuLabel = [[GLGWLabel alloc] initWithFont:SYSTEMFONT(12) theColor:[UIColor colorWithHexString:@"#999999"] inSuperView:self];
        self.miaoShuLabel.text = @"(由卖方发货，并提供售后服务)";
        [self.miaoShuLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.expressTypelabel.mas_bottom).offset(kHeightProportion_In_iPhoneTriploid(3));
            make.right.equalTo(self.expressTypelabel);
            make.height.equalTo(@(kHeightProportion_In_iPhoneTriploid(17)));
        }];
    }
    return self;
}

- (void)setExpressModel:(FillExpressModel *)expressModel
{
    _expressModel = expressModel;
    self.expressTypelabel.text = expressModel.topStr;
    self.miaoShuLabel.text = [NSString stringWithFormat:@"(%@)",expressModel.detailStr];

}
@end
